﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AdminSiteRole.aspx.cs" Inherits="Manage_Admin_AdminSiteRole" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <!--#include file="../js/html_head.inc"-->
    <link rel="stylesheet" href="../Themes/<%=ManageHelper.GetTheme()%>/style.css" type="text/css" />

    <script language="javascript" type="text/javascript">
 function checkAll()
            {
                var   ingc;
                var all=document.getElementById("divnodes");
                var allcheckbox=all.getElementsByTagName("input");
                for   (ingc=0;ingc<allcheckbox.length;ingc++)   
                {
                    if(allcheckbox[ingc].name="RoleFlag")
                    {
                        allcheckbox[ingc].checked=true;
                    }        
                 } 
            }
           function checkAllF()
            {
                var   ingc;
                var all=document.getElementById("divnodes");
                var allcheckbox=all.getElementsByTagName("input");
                for   (ingc=0;ingc<allcheckbox.length;ingc++)   
                {
                    if(allcheckbox[ingc].name="RoleFlag")
                    {
                        allcheckbox[ingc].checked=false;
                    }        
                 } 
            }
    </script>

</head>
<body>
    <%=ManageHelper.PageSucMsg()!=""?"<div class='msg_succeed'>"+ManageHelper.PageSucMsg()+"</div>":""%>
    <form id="form1" action="?act=save" method="post" onsubmit="return validator(this)">
        <div class="column">
            <div class="columntitle">
                为管理员【<%=modelAdmin.Username%>】分配【<%=modelCmsSite.SiteName%>】站点下的权限</div>
            <div class="divRoleFlag" id="divRoleFlag" style="width: 96%">
                <%=GetRoleFlagList(","+modelAdmin.RoleFlags+",", ","+modelAdmin.PlusFlag+",", siteID)%>
            </div>
        </div>
        <table width="100%" align="center" cellspacing="0" cellpadding="0">
            <tr>
                <td>
                </td>
                <td align="center">
                    <input type="submit" name="Submit" value="保存" id="Submit" class="button" />
                    <input type="button" value="返回" class="button" onclick="javascript:window.location.href='AdminList.aspx'" />
                    &nbsp;<input type="hidden" name="siteID" value="<%=siteID %>" />
                    &nbsp;<input type="hidden" name="userID" value="<%=userID %>" />
                </td>
                <td>
                </td>
            </tr>
        </table>
    </form>
    <form id="form2" action="AdminSiteRole.aspx?act=addNodeRole" method="post">
        <div class="column">
            <div class="columntitle">
                为管理员【<%=modelAdmin.Username%>】分配【<%=modelCmsSite.SiteName%>】站点下对栏目的权限</div>
            <div class="divRoleFlag" id="divnodes" style="width: 96%">
                <!--列表-->
                <table style="width: 100%;" border="0" cellpadding="0" cellspacing="0">
                    <tr style="height: 10px;">
                        <td>
                        </td>
                    </tr>
                    <tr style="height: 15px;">
                        <td>
                            <a href="javascript:void(0)" onclick="checkAll();return false;">全选</a>| <a href="javascript:void(0)"
                                onclick="checkAllF();return false;">全不选</a>
                        </td>
                    </tr>
                    <tr style="height: 10px;">
                        <td>
                        </td>
                    </tr>
                    <%=getNodeList(0,siteID) %>
                    <tr style="height: 10px;">
                        <td>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <table width="100%" align="center" cellspacing="0" cellpadding="0">
            <tr>
                <td>
                </td>
                <td align="center">
                    <input type="submit" name="Submit" value="保存" id="Submit1" class="button" />
                    <input type="button" value="返回" class="button" onclick="javascript:window.location.href='AdminList.aspx'" />
                    &nbsp;<input type="hidden" name="siteID" value="<%=siteID %>" />
                    &nbsp;<input type="hidden" name="userID" value="<%=userID %>" />
                </td>
                <td>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
